<template>
    <div class="header box">
        {{title}}
    </div>
</template>

<script>
    export default {
        name: "Header",
        props: {
            'title':{
                //设置默认值
                default:'',
                //设置传值类型
                type:String,
                //必填校验
                required:true
            }
        }
    }
</script>

<style scoped>
    .header {
        height: 30px;
        width: 100%;
        background-color: #2e6da4;
        text-align: center;
        color: red;
        font-weight: bold;
        position: fixed;
        top: 0;
    }

    .box {
        display: flex;
        justify-content: center;
        align-items: center;
    }
</style>